home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 081-090 / amok81 / m2 / defs / randomnumber.def < prev    next >
Text File  |  1993-11-04  |  607b  |  24 lines

  1. DEFINITION MODULE RandomNumber; (* jr/2jul87 *)
  2. (*$ LargeVars:=FALSE NameChk:=FALSE *)
  3.  
  4. PROCEDURE Random(): REAL;
  5. (*
  6.   This function returns real pseudo-random numbers in
  7.   the range [0,1). It is guaranteed that the period of
  8.   the sequence is greater than 2^23.
  9. *)
  10.  
  11. PROCEDURE RND(n: LONGINT): LONGINT;
  12. (*
  13.   This function returns integer pseudo-random numbers in
  14.   the range [0,n). It's function can be thought as
  15.   rolling a dice with n sides. So you can implement a
  16.   'true' dice with a function like: eyes:=RND(6)+1
  17. *)
  18.  
  19. PROCEDURE GetSeed(VAR s:LONGINT);
  20.  
  21. PROCEDURE PutSeed(s:LONGINT);
  22.  
  23. END RandomNumber.
  24.